import React, { Component } from 'react'
import Item from '../Item'
import './index.css'

export default class List extends Component {
  render() {
    const {todos,updateTodo,handleDelete}=this.props
    return (
      <div className='todo-main'>
       {
        // js 代码 ,必须要包括到{}
         todos.map(todo=>{
          return  <Item  key={todo.id} todo={todo} updateTodo={updateTodo} handleDelete={handleDelete}/>
         })
       }
       
      </div>
    )
  }
}
